<cfsetting enablecfoutputonly="true" />
<!--- @@displayname: Standard Page Display for jcPodcast --->
<!--- @@author: Jeff Coughlin (jeff[at]jeffcoughlin[dot]com) --->

<cfimport taglib="/farcry/core/tags/webskin" prefix="skin" />

<!--- TEMP VARIABLES --->
<cfset stObj.apWidth = 290 />
<cfset stObj.apHeight = 24 />
<cfset stObj.flashVersion = "8.0.0" />


<!--- !!!TEMP REPLACEMENT!!! --->
<!--- Apply a custom stylesheet --->
<cfsavecontent variable="audioPlayerHead">
  <!--- Output JS for HEAD --->
  <cfoutput>
  <script type="text/javascript" src="#application.stplugins.jcPodcast.url.pluginroot#/js/audio-player.js"></script>
  </cfoutput>
</cfsavecontent>

<!--- Warning: the htmlhead tag adds a lot of tabbed whitespace.  There's nothing I can do about it (I need the htmlHead tag to overcome caching issues using the objectBroker) --->
<skin:htmlHead id="audioPlayerHead" text="#variables.audioPlayerHead#" />

<!--- Code for SWFObject 2.0+ --->
<!--- Due to a change in SWFObject 2.0, we are now using nested DIVs (SWFObject 2.0 "replaces" the block element with an object tag) --->
<cfoutput>
  <div class="audioPlayerParent">
    <div id="a#stObj.objectId#" class="audioPlayer">
    </div>
  </div></cfoutput>

<object type="application/x-shockwave-flash" data="http://www.fakedomain.com/myname/audio/player.swf" id="audioplayer1" height="24" width="290">
<param name="movie" value="http://www.fakedomain.com/myname/audio/player.swf">
<param name="FlashVars" value="playerID=1&amp;soundFile=http://www.fakedomain.com/myname/audio/music.mp3">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="wmode" value="transparent">
</object> 



<cfsavecontent variable="audioPlayer_js">
<cfoutput>
  <script type="text/javascript">
    // <![CDATA[
    var flashvars = {};
    // unique ID
    flashvars.playerID = "#stObj.objectId#";
    // load the file
    flashvars.soundFile= "#application.url.webroot#/files/#stObj.enclosure#";
     // Load width and Height again to fix IE bug
    flashvars.width = "#stObj.apWidth#";
    flashvars.height = "#stObj.apHeight#";
    
    // Add custom variables
    var params = {};
    params.allowScriptAccess = "sameDomain";
    params.quality = "high";
    params.allowfullscreen = "true";
    params.wmode = "transparent";
    
    var attributes = false;
    
    swfobject.embedSWF("#application.stplugins.jcPodcast.url.pluginroot#/includes/player.swf", "a#stObj.objectId#", "#stObj.apWidth#", "#stObj.apHeight#", "#stObj.flashVersion#","#application.stplugins.jcPodcast.url.pluginroot#/includes/expressinstall.swf", flashvars, params, attributes);
    // ]]>
  </script>
</cfoutput>
</cfsavecontent>

<!--- <cfhtmlhead text="#variables.audioPlayer_js#" /> --->
<!--- Warning: the htmlhead tag adds a lot of tabbed whitespace.  There's nothing I can do about it (I need the htmlHead tag to overcome caching issues using the objectBroker) --->
<skin:htmlHead text="#variables.audioPlayer_js#" />

<cfsetting enablecfoutputonly="false" />